<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>nested consult</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
	<style> 
		.ui-widget,        
		.ui-widget .ui-widget { font-size: 90% !important;} 
	</style>
</h:head>
<h:body>

<h:form>

		<p:megaMenu>
			<p:menuitem value="Главная" url="http://localhost:8080/nesteDDevelopment/main.jsf" icon="ui-icon-document" />
			<p:menuitem value="Участники" url="http://localhost:8080/nesteDDevelopment/users.jsf" icon="ui-icon-pencil" />
			<p:menuitem value="Дистрибьюторы" url="http://localhost:8080/nesteDDevelopment/distrs.jsf" icon="ui-icon-contact" />
			<p:menuitem value="Процессы" url="http://localhost:8080/nesteDDevelopment/processes.jsf" icon="ui-icon-contact" />
		</p:megaMenu>
		
		<h:panelGrid columns="3">
						
			<h:outputLabel value="Наименование дистрибьютора :" for="newDistrName" />
			<p:inputText value="#{distrsBean.newDistrName}" id="newDistrName"/>
			<br/>
			
			<h:outputLabel value="Город :" for="newDistTown" />
			<p:inputText value="#{distrsBean.newDistrTown}" id="newDistrTown"/>
			<br/>
			
		</h:panelGrid>	
		
		<p:commandButton value="Add distr" action="#{distrsBean.addDistr}" update="distrs"/>
		
		<h:panelGrid columns="3">
			
			<h:outputLabel value="Дистрибюьторы :" for="selectedDistr" />
			<p:selectOneMenu id="distrs" value="#{distrsBean.selectedDistr}" label="selectedDistr" style="width:100%" required="false">
				<f:converter converterId="distrConverter" />
				<f:selectItems value="#{distrsBean.distrs}" var="distrs" />
				
            </p:selectOneMenu>
			<br/>
		
		</h:panelGrid>
		
			
</h:form>
</h:body></html>